    $(document).ready(function() {
        Judgeidentity()
        loadTableData()
    })

    //加载表格数据

    function loadTableData() {

        var data = [ {
            "name": '马群科创中心A栋',
            "address": '仙林大道18号',
            "duration": '紫竹物业',
            "phone": '18956487756',
            "fireSquadron": '马群中队',
            "fireSquadronPhone": '13658495565',
            "score": '84'
        },{
            "name": '马群科创中心B栋',
            "address": '仙林大道18号',
            "duration": '紫竹物业',
            "phone": '18956487756',
            "fireSquadron": '马群中队',
            "fireSquadronPhone": '13658495565',
            "score": '54'
        },{
            "name": '马群科创中心C栋',
            "address": '仙林大道18号',
            "duration": '紫竹物业',
            "phone": '18956487756',
            "fireSquadron": '马群中队',
            "fireSquadronPhone": '13658495565',
            "score": '66'
        },{
            "name": '紫东创业园A栋',
            "address": '仙林大道18号',
            "duration": '紫竹物业',
            "phone": '18956487756',
            "fireSquadron": '马群中队',
            "fireSquadronPhone": '13658495565',
            "score": '98'
        },{
            "name": '紫东创业园B栋',
            "address": '仙林大道18号',
            "duration": '紫竹物业',
            "phone": '18956487756',
            "fireSquadron": '马群中队',
            "fireSquadronPhone": '13658495565',
            "score": '89'
        },{
            "name": '紫东创业园C栋',
            "address": '仙林大道18号',
            "duration": '紫竹物业',
            "phone": '18956487756',
            "fireSquadron": '马群中队',
            "fireSquadronPhone": '13658495565',
            "score": '65'
        },{
            "name": '紫东创业园D栋',
            "address": '仙林大道18号',
            "duration": '紫竹物业',
            "phone": '18956487756',
            "fireSquadron": '马群中队',
            "fireSquadronPhone": '13658495565',
            "score": '78'
        }]

        layui.use('table', function() {
            var table = layui.table;

            //第一个实例
            table.render({
                title: '',
                text: {
                    none: '暂无数据'
                },
                elem: '#body-content-table',
                skin: 'nob',
                data: data,
                page: { limit: 13, } //开启分页
                ,
                cols: [
                    [ //表头
                        { field: 'name', title: '建筑物名称', align: 'center' },
                        { field: 'address', title: '地址', width: 150, align: 'center', },
                        { field: 'duration', title: '物业单位', align: 'center' },
                        { field: 'phone', title: '物业电话', align: 'center' },
                        { field: 'fireSquadron', title: '消防中队', align: 'center' },
                        { field: 'fireSquadronPhone', title: '中队电话', align: 'center' },
                        {
                            title: '详情',
                            align: 'center',
                            templet: function(d) {
                                let res = JSON.stringify(d);
                                return `<div><div class="table-tool">
                                    <div onclick='assignTo(${res})'><img src="../static/img/detail.png">详情</div>
                                  </div></div>`
                            },
                        },
                    ]
                ]
            });

        });
    }